import Index from '../views/Index';
import AdminIndex from '../views/Admin/AdminIndex';

export default [
    {
        path: '/',
        component: Index,
        name: "Index", 
        meta: {
            title: "首页",
        },
        children: [
            {
                path: '/home',
                alias: "/",
                name: "Home",
                components: {
                    Index: () => import(/* webpackChunkName: "Home" */ '../views/Home.vue')
                },
            },
            {
                path: "/problem",
                name: "ProblemIndex",
                meta: {
                    title: "题库",
                },
                components: {
                    Index: () => import(/*webpackChunkName:"ProblemIndex"*/"../views/Problem/ProblemIndex.vue")
                },
                children: [
                    {
                        path: '/problem/',
                        name: "ProblemList",
                        components: {
                            ProblemIndex: () => import(/* webpackChunkName: "ProblemList" */ '../views/Problem/ProblemList.vue')
                        },
                    },
                    {
                        path: '/problem/content',
                        name: "ProblemContent",
                        meta: {
                            title: "当前题",
                        },
                        components: {
                            ProblemIndex: () => import(/* webpackChunkName: "ProblemContent" */ '../views/Problem/ProblemContent.vue')
                        },
                    },
                ]
            },

            {
                path: '/status',
                name: "Status",
                meta: {
                    title: "状态",
                },
                components: {
                    Index: () => import(/* webpackChunkName: "Status" */ '../views/Status.vue')
                },
            },
            {
                path: '/ranking',
                name: "Ranking",
                meta: {
                    title: "排名",
                },
                components: {
                    Index: () => import(/* webpackChunkName: "Ranking" */ '../views/Ranking.vue')
                },
            },
            {
                path: '/contest',
                name: "ContestIndex",
                meta: {
                    title: "竞赛",
                },
                components: {
                    Index: () => import(/* webpackChunkName: "Contest" */ '../views/Contest/ContestIndex.vue')
                },
                children: [
                    {
                        path: "/contest/",
                        name: "ContestList",
                        components: {
                            ContestIndex:()=>import(/*webpackChunkName: "ContestList" */ "../views/Contest/ContestList.vue")
                        },
                    },
                    {
                        path: "/contest/centent",
                        name: "ContestCentent",
                        meta: {
                            title: "本比赛",
                        },
                        components: {
                            ContestIndex:()=>import(/*webpackChunkName: "ContestCentent" */ "../views/Contest/ContestCentent.vue")
                        },
                    },
                    {
                        path: "/contest/rank",
                        name: "ContestRank",
                        meta: {
                            title: "排名",
                        },
                        components: {
                            ContestIndex:()=>import(/*webpackChunkName: "ContestRank" */ "../views/Contest/ContestRank.vue")
                        },
                    },
                ]
            },
            {
                path: '/message',
                name: "Message",
                meta: {
                    title: "消息",
                },
                components: {
                    Index: () => import(/* webpackChunkName: "Message" */ '../views/Message.vue')
                },
            },
            {
                path: '/help',
                name: "Help",
                meta: {
                    title: "帮助",
                },
                components: {
                    Index: () => import(/* webpackChunkName: "Help" */ '../views/Help.vue')
                },
            },
            {
                path: '/about',
                name: "About",
                meta: {
                    title: "关于",
                },
                components: {
                    Index: () => import(/* webpackChunkName: "About" */ '../views/About.vue')
                },
            },
            {
                path: '/login',
                name: "Login",
                meta: {
                    title: "登录",
                },
                components: {
                    Index: () => import(/* webpackChunkName: "Login" */ '../views/Login.vue')
                },
            },
            {
                path: '/userinfo',
                name: "UserInfo",
                meta: {
                    title: "用户",
                },
                components: {
                    Index: () => import(/* webpackChunkName: "UserInfo" */ '../views/UserInfo.vue')
                },
            },
        ],
    },
    {
        path: '/admin',
        component: AdminIndex,
        name: "AdminIndex",
        children: [
            {
                path: '/admin/home',
                alias: "/admin",
                name: "AdminHome",
                components: {
                    AdminIndex: () => import(/* webpackChunkName: "AdminHome" */ '../views/Admin/AdminHome.vue')
                },
            },
            {
                path: '/admin/problem',
                name: "AdminProblem",
                components: {
                    AdminIndex: () => import(/* webpackChunkName: "AdminProblem" */ '../views/Admin/AdminProblem.vue')
                },
            },
        ],
    },
]